package com.todo.biz.application.entity.bo;

import com.todo.common.common.enums.BusinessSceneEnum;
import com.todo.biz.common.enums.AssociateRelationTypeEnum;
import lombok.Data;

/**
 * @author azhebuxing
 * @date 2024/5/7 16:33
 * @description
 */
@Data
public class BizAssociateBO {
    /**
     * 主键
     */
    private Long id;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 关联类型：点赞、收藏、浏览等
     */
    private AssociateRelationTypeEnum relationType;
    /**
     * 业务场景
     */
    private BusinessSceneEnum businessScene;
    /**
     * 关联id
     */
    private Long relationId;
    /**
     * 状态：关联、取消
     * 注：初期都为 关联
     */
    private Integer status;
    /**
     * 扩展信息
     */
    private Extra extra;

    @Data
    public static class Extra {

    }

    public Boolean baseCheck() {
        if (relationType == null || businessScene == null || relationId == null || userId == null) {
            return false;
        }
        return true;
    }
}
